<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:70:"/www/wwwroot/mamingwang.cn/yzf/application/admin/view/user/chakan.html";i:1557019818;s:70:"/www/wwwroot/mamingwang.cn/yzf/application/admin/view/common/head.html";i:1556002984;}*/ ?>
<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>聚财国际</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/public/static/css/font.css"> 
	<link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" /> 
    <link rel="stylesheet" href="/public/static/css/xadmin.css">
    <link href="/public/static/lib/layui/css/layui.css" rel="stylesheet">
    <script type="text/javascript" src="/public/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="/public/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/public/static/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/css">
      #fff{
        border: red solid 1px;
      }
    </script>
  </head>
  
<body>
<div class="x-body">
    <table class="layui-table">
        <thead>
            <th style="text-align: center">会员详细信息</th>
        </thead>

    </table>
</div>
<form class="layui-form" action="" method="post">
    <input type="hidden" value="<?php echo $uid; ?>" name="uid">
    <div class="layui-form-item">
        <label class="layui-form-label">用户ID：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
        <input type="text" value="<?php echo $rs['uid']; ?>"  readonly class="layui-input" style="border: none"></div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">上级：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" value="<?php echo $rs['tuiphone']; ?>" readonly class="layui-input" style="border: none"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">推荐人：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" value="<?php echo $rs['tuiname']; ?>" readonly class="layui-input" style="border: none"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">邀请码：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" value="<?php echo $rs['yqm']; ?>" readonly class="layui-input" style="border: none"></div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">信用额度：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" value="<?php echo $rs['u_money']; ?>" readonly class="layui-input" style="border: none"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">余额：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" value="<?php echo $rs['y_money']; ?>" readonly class="layui-input" style="border: none"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">信誉分：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" value="<?php echo $rs['score']; ?>" readonly class="layui-input" style="border: none"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">账号：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" value="<?php echo $rs['u_phone']; ?>" readonly class="layui-input" style="border: none"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">姓名：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" name="u_name" required  lay-verify="required" value="<?php echo $rs['u_name']; ?>" placeholder="请输入姓名" autocomplete="off" class="layui-input"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">身份证号：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" name="u_card" required value="<?php echo $rs['u_card']; ?>" lay-verify="identity" placeholder="请输入省份证号" autocomplete="off" class="layui-input"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">微信号：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" name="wx_no" required value="<?php echo $rs['wx_no']; ?>" lay-verify="required" placeholder="请输入微信号" autocomplete="off" class="layui-input"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">支付宝：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" name="alipay" value="<?php echo $rs['alipay']; ?>" required  lay-verify="required" placeholder="请输入支付宝账号" autocomplete="off" class="layui-input"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">电子邮箱：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="text" name="u_email" required value="<?php echo $rs['u_email']; ?>"  lay-verify="email" placeholder="请输入电子邮箱" autocomplete="off" class="layui-input"></div>
    </div>
  	<?php if($rs['did']==$did['uid']): ?>
    <div class="layui-form-item">
        <label class="layui-form-label">利率：</label>
        <div class="layui-input-block" style="width: 150px">
            <select name="lilv" lay-verify="required">
                <option value="<?php echo $rs['lilv']; ?>"checked><?php echo $rs['lilv']; ?></option>
                <option value="0.008">0.0008</option>
                <option value="0.0013">0.0013</option>
                <option value="0.001">0.001</option>
            </select>
        </div>
    </div><?php else: ?>
  	<div class="layui-form-item">
        <label class="layui-form-label">利率：</label>
        <div class="layui-input-block" style="width: 150px">
            <select name="lilv" lay-verify="required">
                <option value="<?php echo $rs['lilv']; ?>"checked><?php echo $rs['lilv']; ?></option>
            </select>
        </div>
    </div>	
   <?php endif; if(\think\Session::get('admin_uid')==1): if($rs['daili']!=1): if($re['daili']==1): else: ?>
    <div class="layui-form-item">
        <label class="layui-form-label">升级代理：</label>
        <div class="layui-input-block" STYLE="width: 800px;">
            <input type="checkbox" <?php if ($rs['daili']==1): ?>  checked="" <?php endif; ?> name="status[]" lay-skin="switch" lay-filter="switchSuodoing" lay-text="开启|关闭" value="<?php echo $rs['uid']; ?>"><span style="color: red">升级为代理后、后台的登陆账号和密码和前台默认一致</span><br/><span style="color: red">关闭代理后台账号则被清除</span></div>
    </div><?php endif; else: ?>
  	<div class="layui-form-item">
        <label class="layui-form-label">代理：</label>
      <div class="layui-input-block" STYLE="width: 800px;">
        <button class="layui-btn layui-btn-warm">代理</button>
      </div>
    </div><?php endif; ?>
    <div class="layui-form-item">
        <label class="layui-form-label">加黑名单：</label>
        <div class="layui-input-block" STYLE="width: 200px;">
            <input type="checkbox" <?php if ($rs['u_state'] ==0): ?>  checked="" <?php endif; ?> name="status[]" lay-skin="switch" lay-filter="Suodoing" lay-text="开启|关闭" value="<?php echo $rs['uid']; ?>"></div>
    </div><?php else: endif; ?>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="add">立即提交</button>
           <!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
        </div>
    </div>
    </div>
</form>

<script>
    layui.use(['laydate','form'], function() {
        var laydate = layui.laydate;
        var form = layui.form;
        //执行一个laydate实例
        //监听提交
        form.on('submit(add)', function(data){
            console.log(data);
            var url="";
            $.ajax({
                type: "post",
                async:false,
                url: "<?php echo url('admin/user/chakan'); ?>",
                data: data.field,
                success:function (res) {
                    if(res==1){
                        layer.msg("修改成功！");
                        setTimeout(function () {
                            // 获得frame索引
                            var index = parent.layer.getFrameIndex(window.name);
                            //关闭当前frame
                            parent.layer.close(index);
                            window.parent.location.reload();//刷新父级窗口
                        }, 2000);
                    }
                    else
                    {
                        layer.msg("修改失败！");
                    }
                }
            })
            //发异步，把数据提交给php
            //layer.alert("增加成功", {icon: 6},function () {
            // 获得frame索引
            //var index = parent.layer.getFrameIndex(window.name);
            //关闭当前frame
            // parent.layer.close(index);
            //  });
            return false;
        });
        form.on('switch(switchSuodoing)', function (data) {
            var id = data.value;
            $.ajax({
                url: "<?php echo url('admin/User/daili'); ?>",
                type: "post",
                dataType: "JSON",
                data: {uid: id},
                success: function (res) {
                    if (res == 1) {
                        layer.msg('操作成功！');
                        return false;
                    }else{
                        layer.msg('操作失败！');
                        return false;
                    }
                }
            });
        });
        form.on('switch(Suodoing)', function (data) {
            var id = data.value;
            //监听提交
            $.ajax({
                url: "<?php echo url('admin/User/suoding'); ?>",
                type: "post",
                dataType: "JSON",
                data: {uid: id},
                success: function (res) {
                    if (res == 1) {
                        layer.msg('操作成功！');
                        return false;
                    }else{
                        layer.msg('操作失败！');
                        return false;
                    }
                }
            });
        });
    });
</script>
<script>
    function banner_edit(obj){
        var mid=$(obj).attr('attr_id');
        //alert(mid);
        var url="<?php echo Url('admin/user/chakan'); ?>?uid="+  mid;
        // alert(url);
        x_admin_show('查看',url);
    }
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });


    /*用户-删除*/
    function member_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }
</script>

</body>

</html>